﻿using DimensionsHelper.Common.Contracts;
using DimensionsHelper.Common.Contracts.DataCollector.Options;

namespace DimensionsHelper.Client.ViewModels.DataCollector;

public partial class MarkViewModel : ObservableObject, IProjectOption<Mark>
{
    [ObservableProperty]
    private string _fit = string.Empty;


    [ObservableProperty]
    private string _greater = string.Empty;


    [ObservableProperty]
    private string _less = string.Empty;

    [ObservableProperty]
    private string _name = string.Empty;


    public Mark GetOptionObject()
    {
        return new Mark();
    }


    public void LoadOption(Mark source)
    {
        Name = source.Name;
        Fit = source.Fit;
        Less = source.Less;
        Greater = source.Greater;
    }


    public bool TryWriteOption(Mark target)
    {
        target.Name = Name;
        target.Fit = Fit;
        target.Less = Less;
        target.Greater = Greater;
        return true;
    }
}